function Setdata(t, e) {
    return new Promise(function(i) {
        t.setData(e, i);
    });
}

Object.defineProperty(exports, "__esModule", {
    value: !0
});

exports.behavior = Behavior({
    created: function() {
        var componentInstance = this;
        if (this.$options) {
            var computedValues = {}, computedDefinitions = this.$options().computed, computedKeys = Object.keys(computedDefinitions);
            this.calcComputed = function() {
                var updatedValues = {};
                return computedKeys.forEach(function(computedKey) {
                    var computedValue = computedDefinitions[computedKey].call(componentInstance);
                    computedValues[computedKey] !== computedValue && (computedValues[computedKey] = updatedValues[computedKey] = computedValue);
                }), updatedValues;
            };
        }
    },
    attached: function() {
        this.set();
    },
    methods: {
        set: function(data, callback) {
            var componentInstance = this, promises = [];
            return data && promises.push(Setdata(this, data)), this.calcComputed && promises.push(setData(this, this.calcComputed())), 
            Promise.all(promises).then(function(results) {
                return callback && "function" == typeof callback && callback.call(componentInstance), results;
            });
        }
    }
});